package cn.zymall.seckillOrder.order.listen;

import cn.zymall.common.listen.BaseAMQPListen;
import cn.zymall.common.utils.amqp.AMQPField;
import com.google.gson.Gson;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author xuxianda
 * @Description: 监听抢购秒杀用户下单
 * @date 2020/8/24 21:26
 * @Copyright
 * @return
 **/
@Component
@RabbitListener(queues = AMQPField.SEC_KILL_ORDERS)
public class ListenToSecKillOrders implements BaseAMQPListen {
//    private static Gson gson = new Gson();

    @Override
    @RabbitHandler
    public void listenMsg(String msg) {
        System.out.println(msg);
    }

}
